package support;

import java.util.LinkedHashMap;
import java.util.Vector;

public class student
{
   public LinkedHashMap<Integer, Degree> degreeMap;
   public address                        addy;
   public Name                           name;
   public int                            citizenship;
   public int                            residence;
   public Vector                         countries;
   public Vector                         universities;
   public Vector                         specializations;
   public int                            spec;
   public Vector                         months;
   public Vector majors;

   public String getdegDiscipline(int i)
   {
      return (String) this.getMajors().get(i);
   }
   public void setMajors(Vector majors)
   {
      this.majors = majors;
   }

   public Vector getMajors()
   {
      return this.majors;
   }

   public Vector getMonthVector()
   {
      return this.months;
   }

   public void setMonthVector(Vector month)
   {
      this.months = month;
   }

   public student()
   {
      addy = new address();
      degreeMap = new LinkedHashMap<Integer, Degree>();

   }

   public void setResidence(int i)
   {
      this.residence = i;
   }

   public int getResidence()
   {
      return this.residence;
   }// changed this

   public void setCitizenship(int i)
   {
      this.citizenship = i;
   }

   public int getCitizenship()
   {
      return this.citizenship;
   }

   public void setCountryVector(Vector countries)
   {
      this.countries = countries;
   }

   public Vector getCountryVector()
   {
      return this.countries;
   }

   public void setUniversityVector(Vector universities)
   {
      this.universities = universities;
   }

   public Vector getUniversityVector()
   {
      return this.universities;
   }

   public void setSpecializationVector(Vector specialization)
   {
      this.specializations = specialization;
   }

   public Vector getSpecializationVector()
   {
      return this.specializations;
   }

   public void setSpecialization(int spec)
   {
      this.spec = spec;
   }

   public String getSpecialization()
   {
      return (String) specializations.get(spec);
   }

   public class Name
   {
      public String firstName;
      public String middleInitial;
      public String lastName;

      public Name(String fName, String mInital, String lName)
      {
         this.setFirstName(fName);
         this.setMiddleInitial(mInital);
         this.setLastName(lName);
      }

      public void setFirstName(String fName)
      {
         firstName = fName;
      }

      public void setLastName(String lName)
      {
         lastName = lName;
      }

      public void setMiddleInitial(String mInitial)
      {
         middleInitial = mInitial;
      }

      public String toString()
      {
         return (firstName + " " + middleInitial + " " + lastName);
      }
   }

   public class Degree
   {
      int           degLocation   = 0;
      int           degUniversity = 0;
      int           degYear       = 0;
      int           degMonth      = 0;
      double        degGPA        = 0.0;
      String        degType       = "";
      int           discipline    = 0;
      String        state         = "";
      public Vector tuple;              // first entry state followed by univ
      public Vector onlyUniversities;
      
      public Vector months;

      public Vector getTuple()
      {
         return this.tuple;
      }

      public void setTuple(Vector tuple)
      {
         this.tuple = tuple;
      }

      public Degree()
      {

      }

      public void setState()
      {
         state = (String) this.getTuple().get(0);
      }

      public String getState()
      {
         return this.state;
      }

      public void setdegDiscipline(int degDiscipline)
      {
         this.discipline = degDiscipline;
      }
      
      public int getDiscipline()
      {
         return this.discipline;
      }
   

      public void setdegYear(int degYear)
      {
         this.degYear = degYear;
      }

      public int getdegYear()
      {
         return degYear;
      }

      public void setdegMonth(int degMonth)
      {
         this.degMonth = degMonth;
      }

      public int getdegMonth()
      {
         return this.degMonth;
      }

      public void setMonthsVector(Vector months)
      {
         this.months = months;
      }

      public void setdegGPA(double degGPA)
      {
         this.degGPA = degGPA;
      }

      public double getdegGPA()
      {
         return degGPA;
      }

      public void setdegType(String degType)
      {
         this.degType = degType;
      }

      public String getdegType()
      {
         return degType;
      }

      public void setDegreeLocation(int degLocation)
      {
         this.degLocation = degLocation;
      }

      public int getDegLocation()
      {
         return this.degLocation;
      }

      public void setDegreeUniversity(int university)
      {
         this.degUniversity = university;
      }

      public String getDegreeUniversity()
      {
         return (String) this.getOnlyUniversities().get(
               this.degUniversity);
      }

      public void setOnlyUniversities()
      {
         this.onlyUniversities = (Vector) this.tuple.get(1);
      }

      public Vector getOnlyUniversities()
      {
         return this.onlyUniversities;
      }
   }
}
